<%@page import="com.billing.model.entity.Message"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@page isELIgnored="false" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

String userid = request.getSession().getAttribute("managerid").toString();//获取当前登录用户

String uid=request.getAttribute("uid").toString();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>审核数据</title>
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link id="bootstrap-style" href="<c:url value="/css/bootstrap.min.css"/>" rel="stylesheet">
	<link href="<c:url value="/css/bootstrap-responsive.min.css"/>" rel="stylesheet">
	<link id="base-style" href="<c:url value="/css/style.css"/>" rel="stylesheet">
	<link id="base-style-responsive" href="<c:url value="/css/style-responsive.css"/>" rel="stylesheet">
	<link href="<c:url value="/css/index.css"/>" rel="stylesheet">
	<link rel="shortcut icon" href="<c:url value="/img/favicon.ico"/>">
	<link href="<c:url value="/css/page.css"/>" rel="stylesheet">
	<link rel="stylesheet" type="text/css" href="<c:url value="/css/jquery.datetimepicker.css"/>"/>
	<link href="<c:url value="/css/navuser.css"/>" rel="stylesheet">
	<link href="<c:url value="/css/but.css"/>" rel="stylesheet">
	<script src="<c:url value="/js/jquery-1.9.1.min.js"/>"></script>
	<script src="<c:url value="/js/jquery-migrate-1.0.0.min.js"/>"></script>
	<script type="text/javascript" src="<c:url value="/js/layer/layer.js"/>"></script>
	<script src="<c:url value="/js/laydate/laydate.js"/>"></script>
	<script src="<c:url value="/js/build/jquery.datetimepicker.full.js"/>"></script>
	<script src="<c:url value="/js/orgin.js"/>"></script>
	<script src="<c:url value="/js/filebut.js"/>"></script>
</head>
 <script type="text/javascript">
 
 $(function(){ 
	 var msg="${msg}";
	 if(msg!=null&&msg!=""){
		 alert(msg);
         closebutton();
         window.parent.location.reload(); //刷新父页面
	 }
 }); 
 
 $(function(){
	 laydate.render({
		  elem: '#starttime'
		  ,type: 'date'
		  ,format: 'yyyy-MM-dd'
		});
	 laydate.render({
		  elem: '#endtime'
		  ,type: 'date'
		  ,format: 'yyyy-MM-dd'
		});
 });
 //返回
 function reback(){
     var url='<%=basePath%>message/mainpage';
     parent.$("#mainFrame").attr("src",url);
 }
 //取消
 function closebutton() {
		var index = parent.layer.getFrameIndex(window.name);  
	 	parent.layer.close(index);  
}
function audit(){
	<%-- if(<%=uid %> == <%=userid %>){
		alert("添加与审核人不能相同！！！");
	}else{ --%>
		$("#customerform").submit();
	//}
}

</script>
<body>
<div id="content" class="span10" style="background-color:#F9F9F9;">
<div style="background-color:#FFF">
<form name="customerform" id="customerform" method="post" enctype="multipart/form-data" action="<%=basePath%>message/AuditdataMess">
	<input type="hidden" id = "id" name="id" value="${meslist.id }">
	<input type="hidden" id = "hcontenttypeid" name="hcontenttypeid" value="${meslist.contenttypeid }">
	<input type="hidden" id = "huserid" name="huserid" value="${meslist.userid }">
	<input type="hidden" id="addeddate" name="addeddate" value="${meslist.addeddate }">
	<table>
			<tr>
				<td>标题：</td>
				<td>
					<input readonly="readonly" type="text" id="title" name="title" value="${meslist.title }">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				</td>
				<td>作者：</td>
				<td>
					<input readonly="readonly" type="text" id="author" name="author" value="${meslist.author }">
				</td>
			</tr>
			<tr>
				<td>内容类型：</td>
				<td>
					<select name="contenttypeid" id="contenttypeid" class="buildselect">
						<option value="">请选择</option>
						<c:forEach items="${contentlist }" var="a">
							<option disabled="disabled" value="${a.id }"  ${a.id==meslist.contenttypeid?'selected':''}>${a.name }</option>
						</c:forEach> 
					</select>
				</td>
				<td>出处：</td>
				<td>
					<input readonly="readonly" type="text" id="source" name="source" value="${meslist.source }">
				</td>
			</tr>
			<tr>
				<td>摘要：</td>
				<td>
					<input readonly="readonly" type="text" id="introduction" name="introduction" value="${meslist.introduction }">
				</td>
				<td></td>
				<td></td>
			</tr>
			<tr>
				<td>链接：</td>
				<td colspan = "3">
					<input style="width: 100%;" readonly="readonly" type="text" id="linkaddress" name="linkaddress" value="${meslist.linkaddress }">
				</td>
			</tr>
			<tr style="display:none">
				<td>有效起始时间：</td>
				<td>
					<input readonly="readonly" type="text" class="demo-input" value="${meslist.starttime}" placeholder="请选择时间" id="starttime" name="starttime">
				</td>
				<td>有效结束时间：</td>
				<td>
					<input readonly="readonly" type="text" class="demo-input" value="${meslist.endtime}" placeholder="请选择时间" id="endtime" name="endtime">
				</td>
			</tr>
			<tr>
				<td>内容：</td>
				<td colspan = "3">
					<textarea style="width: 100%;" readonly="readonly" style="width: 360px;" rows="6" cols="" id="summary" name="summary">${meslist.summary}</textarea>
				</td>
			</tr>
			<tr>
				<td>审核意见：</td>
				<td colspan = "3">
					<textarea style="width: 100%;height: 50px;" rows="6" cols="" id="auditopinion" name="auditopinion"></textarea>
				</td>
			</tr>
			<!-- <tr>
				<td>流转记录:</td>
				<td></td>
			</tr> -->
	</table>
</form>
<div class="row-fluid content-table">
<table class="table  bootstrap-datatable" style=" border:none; border-spacing:0; border-collapse:collapse;margin:0;padding:0;">
	<tbody>
		<tr class="content-search" style="text-align: center;">
			<td>
				<div>
				    <button style="background-color: #dadada;color: #666;" type="button" onclick="closebutton();" id="output1">取消</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<button style="background-color: #dadada;color: #666;" type="button" onclick="audit();" id="output1">提交审核</button>
				</div>
			</td>
		</tr>
	</tbody>
</table>            
</div>
</div>
</div>	
</body>
</html>
